<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="UTF-8">
	<title>投票列表</title>
	<link rel="stylesheet" href="../css/style.css">
	<link rel="stylesheet" href="../css/index.css">
	<script src="${pageContext.servletContext.contextPath}/webjars/jquery/3.4.1/jquery.js"></script>
	<script src="${pageContext.servletContext.contextPath}/js/index.js"></script>

</head>
<body>
<%@include file="top.jsp"%>
<div id="vote" class="wrap">
	<h2>投票列表</h2>
	<ul class="list">
		<c:forEach items="${subjectPages.records}" var="sub" varStatus="i">
			<li class="${i.index % 2 == 0 ? 'odd' : 'even'}">
				<h4>
					<a href="">${sub.vstitle}</a>
				</h4>
				<div class="join">
					<a href="Vote.action?entityId=<s:property value='id'/>">我要参与</a>
				</div>
				<p class="info">共有 ${fn:length(sub.options)} 个选项，已有${fn:length(sub.items)} 个网友参与了投票。</p>
			</li>
		</c:forEach>
	</ul>

	<div class="pagetools">
		<div class="pagesizeItem">
			<div class="cbopagesize">
				<select name="cbopagesize">
					<option value="4" <c:if test="${pageSize==4}">selected</c:if>>4</option>
					<option value="8" <c:if test="${pageSize==8}">selected</c:if>>8</option>
					<option value="12" <c:if test="${pageSize==12}">selected</c:if>>12</option>
				</select>
			</div>
		</div>
		<div class="pageFirstItem">
			<div class="pageFirst">
				<span class="icon btniconFrist"></span>
				<span class="icon btniconPrve"></span>
			</div>
		</div>
		<div class="pageContentItem">
			第<input type="number" name="pageindex" style="width: 40px" value="${subjectPages.current}" min="1" max="${subjectPages.pages}">页，共<span name="pages" tag="${subjectPages.pages}">${subjectPages.pages}</span>页，总记录数:${subjectPages.total}
		</div>
		<div class="pageLastItem">
			<div class="pageFirst">
				<span class="icon btniconlist2"></span>
				<span class="icon btniconlist3"></span>
			</div>
		</div>
		<div class="pageFalushItem">
			<div class="btniconFalush">
				<span class="btniconFalush"></span>
			</div>
		</div>
	</div>
</div>
<div id="footer" class="wrap">
	北大青鸟 &copy; 版权所有
</div>
</body>
</html>